﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class BallCDController : MonoBehaviour
{
    [Range(0,1)]
    public float value;
    public Text text;
    private Material material;
    void Start()
    {
        material = gameObject.GetComponent<Image>().material;
    }
    void Update()
    {
        text.text = value*100 + "%";
        material.SetFloat("_Value", value);
    }
}
